# from ctp.thosttraderapi import THOST_FTDC_D_Buy,THOST_FTDC_D_Sell,THOST_FTDC_OF_Open,THOST_FTDC_OF_Close,THOST_FTDC_OF_CloseToday
from enum import Enum
# class OrderStatus(Enum):
#     NotOpen="开仓未触发"
#     OpenTrigeredNotClose="开仓已触发，平仓未触发"
#     Closed="平仓已触发"
OrderStatus=('NotOpen','OpenTrigeredNotClose','Closed')
class LogicOpratorStr(Enum):
    MoreThan=">"
    MoreEqual=">="
    LessThan="<"
    LessEqual="<="

class Order:
    def __init__(self,InstrumentID,openClose,LongShort,Volume:int,creatTime,status) -> None:
        self.InstrumentID, self.openClose, self.LongShort,self.Volume, self.creatTime,self.status=InstrumentID, openClose, LongShort,Volume, creatTime,status

class CloseOrder(Order):
    def __init__(self, InstrumentID, openClose, LongShort,Volume:int, creatTime,status,triggerLogic,triggerPrice) -> None:
        super().__init__(InstrumentID, openClose,LongShort, Volume, creatTime,status)
        self.triggerLogic, self.triggerPrice=triggerLogic, triggerPrice

class OpenOrder(CloseOrder):
    def __init__(self, InstrumentID, openClose, LongShort,Volume: int, creatTime, status, triggerLogic, triggerPrice,cutLossNum,stopProfitNum) -> None:
        super().__init__(InstrumentID, openClose, LongShort,Volume, creatTime, status, triggerLogic, triggerPrice)
        self.cutLossNum,self.stopProfitNum=cutLossNum,stopProfitNum

